# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=mitm6
pkgver=33.8e75884
pkgrel=6
pkgdesc='Pwning IPv4 via IPv6.'
arch=('any')
groups=('blackarch' 'blackarch-scanner' 'blackarch-fuzzer' 'blackarch-spoof'
        'blackarch-networking')
url='https://github.com/fox-it/mitm6'
license=('GPL2')
depends=('python' 'scapy' 'python-twisted' 'python-netifaces')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/fox-it/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" Readme.md
}

